﻿using UnityEngine;
using System.Collections;

public class PermitTabBtn : MonoBehaviour {
	public BUILD_TYPE enType;

	void OnClick(){
        GameObject.Find("MainCamera").GetComponent<AudioSource>().PlayOneShot(Resources.Load<AudioClip>("Audio/Pencil_Check"));

		switch (enType) {
		case BUILD_TYPE.COVER:
			transform.parent.GetComponent<BuildingID> ().enType = BUILD_TYPE.COVER;
			break;

		case BUILD_TYPE.BUILDING:
			transform.parent.GetComponent<BuildingID> ().enType = BUILD_TYPE.BUILDING;
			break;
		}
	}
}
